<!doctype html>
<html>

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="../../css/mui.min.css" rel="stylesheet" />
		<link rel="stylesheet" type="text/css" href="../../css/zhide.tool.css" />
	</head>

	<body>
		<header class="mui-bar mui-bar-nav">
			<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">标题</h1>
		</header>
		<div class="mui-content">
			<p id="content"></p>
		</div>
		<script src="../../js/mui.min.js"></script>
		<script src="../../js/zhide.tool.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			mui.init()
			setHeaderBackground();
			mui.plusReady(function() {
				plus.geolocation.getCurrentPosition(function(position) {
					var codns = position.coords;
					latitude = codns.latitude;
					longitude = codns.longitude;
					//第一次取得列表
					mui.ajax('http://www.chn000.com/hotel/api/queryNearby', { //向url提交get
						data: {
							latitude: latitude,
							longitude: longitude,
							size: 40
						}, //向url提交的data数据
						dataType: 'json',
						timeout: 8000,
						success: function(data) {
							localStorage.setItem('bendi',data[7]);
						},
						error: function(xhr, type, errorThrown) {
							requestError('加载列表失败', wt);
						}
					});
				});
			})
			shuju = localStorage.getItem('bendi');
			for(var i in shuju){
				console.log(shuju[i]);
			}
			//获取当前位置
		</script>
	</body>

</html>